package b1.mobile.blackberry.ui.component.util;

import net.rim.device.api.ui.Font;
import net.rim.device.api.ui.FontFamily;
import net.rim.device.api.ui.Ui;

public class FontFactory {
	static String FamilyName = "Alpha Sans";
	
	public static Font getFont(int style, int fontSize){
		return getFont(style, fontSize, Ui.UNITS_pt);
	}
	
	public static Font getFont(int style, int fontSize, int unit){
		Font retFont = Font.getDefault();
		
		try {
			retFont = FontFamily.forName(FamilyName).getFont(style, fontSize, unit);
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
		}
		
		return retFont;
	}
}
